home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!ts1-10
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: Help! C++ undef array problem
- Date: Sun, 03 Mar 96 07:32:54 GMT
- Organization: MiddleWorld SoftWare
- Message-ID: <4hbhur$899@sam.inforamp.net>
- References: <4gnrm0$gcq@vista.hevanet.com>
- NNTP-Posting-Host: ts1-10.tor.inforamp.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <4gnrm0$gcq@vista.hevanet.com>, Lefty@hevanet.com (Lefty) wrote:
- >Shouldn't the integer 3 in (*GetModule(),"fish",3) be passed to Sea.cpp and
- Sea.h
-
- Nope. Try the following.
-
- >
- >//************************** Lefty.cpp
- ************************************************************
- >#include <owl\applicat.h>
- >#include <owl\framewin.h>
- >#inclued <owl\dc.h>
- >#include Sea.h
- >
- >class Try : public TFrameWindow
- >{
- > public:
- > Try(TWindow *parent, const char far *title);
- > private:
- > Sea* Animation
- >}:
- >
- >Try::Try(TWindow *parent, const char far *title) : TFrameWindow(parent,
- title)
- >{
- > Animation = new Sea(*GetModule(),"fish",3);
- >}
- >
- >
- >
- >// *************************** Sea.h
- *****************************************************************
- >class Sea {
- > public:
- > Sea::Sea(HINSTANCE hInst, char far* name, int n);
- > private:
- > int *bx; };
- >
- >
- >
- >// **************************** Sea.cpp
- **************************************************************
- >#include <owl\applicat.h>
- >#include <owl\framewin.h>
- >#inclued <owl\dc.h>
- >#include Sea.h
- >
- >Sea::Sea(HINSTANCE hInst, char far* name, int n)
- >{
- > bx = new int[n];
- > for(int i=1;i<=n;i++) {
- > bx[i]= 3 }
- >}
-